<?php

namespace App\Admin\Actions\Department;

use Dcat\Admin\Widgets\Modal;
use Dcat\Admin\Grid\RowAction;


class AuditAction extends RowAction
{

    protected $title = '<a href="javascript:void(0)"><i class="feather icon-check"></i>审核</a>';

    public function render()
    {
        // 实例化表单类并传递自定义参数
        $form = AuditForm::make()->payload(['id' => $this->getKey()]);

        return Modal::make()
            ->lg()
            ->title('审核')
            ->body($form)
            ->button($this->title);
    }
}